package com.sardine.base.hbase.persister;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * 上海京东到家元信信息技术有限公司<br>
 * Created with IntelliJ IDEA.
 * Date:2017/11/21
 * Time:20:58
 * 被转换后的数据模型
 * @author daifeng<br>
 *         daifeng@imdada.cn
 * @since JDK 1.7 <br>
 * Copyright (c) 2017 imdada System Incorporated All Rights Reserved.
 */
public class HEntity {
    private static final Logger logger = LoggerFactory.getLogger(HEntity.class);
    /**
     * 表空间
     */
    private String tableSpace;
    /**
     * 表名称
     */
    private String tableName;

    /**
     * 行键
     */
    private String rowKey;
    /**
     * 属性信息
     */
    private List<DataModel> dataModelList = new ArrayList<>();


    public String getTableSpace() {
        return tableSpace;
    }

    public void setTableSpace(String tableSpace) {
        this.tableSpace = tableSpace;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getRowKey() {
        return rowKey;
    }

    public void setRowKey(String rowKey) {
        this.rowKey = rowKey;
    }

    public List<DataModel> getDataModelList() {
        return dataModelList;
    }

    public void setDataModelList(List<DataModel> dataModelList) {
        this.dataModelList = dataModelList;
    }

    /**
     * 属性描述内部类
     */
   public static class DataModel {
        //列族名称
        private String columnFamily;
        //列名称
        private String qualifier;
        //属性值==【如果非基本属性，则转换成json字符串】，date类型格式化成：yyyy-MM-dd HH:mm:ss
        private String fieldValue;

        public String getColumnFamily() {
            return columnFamily;
        }

        public void setColumnFamily(String columnFamily) {
            this.columnFamily = columnFamily;
        }

        public String getQualifier() {
            return qualifier;
        }

        public void setQualifier(String qualifier) {
            this.qualifier = qualifier;
        }

        public String getFieldValue() {
            return fieldValue;
        }

        public void setFieldValue(String fieldValue) {
            this.fieldValue = fieldValue;
        }
    }
}
